package com.service;

import com.dao.AdminDao;
import com.dao.ReceiveAddressDao;
import com.dao.ums.AdminLoginLogDao;
import com.entity.Admin;
import com.entity.ums.AdminLoginLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ReceiveAddressService {

    @Autowired
    private ReceiveAddressDao receiveAddressDao;
    @Autowired
    private AdminDao adminDao;
    @Autowired
    private AdminLoginLogDao adminLoginLogDao;

    //    public Map<String, Object> getReceiveOrder(Integer id) {
//        Map<String, Object> one = receiveAddressDao.getOne(id);
//        return one;
//    }
    public List<Admin> getList() {
        return adminDao.getAdminList();
    }

    public List<Map<String, Object>> getReceiveAddressList() {
        return receiveAddressDao.getList();
//        return null;
    }

    public Admin getAdminAndLog(Integer id) {
        return adminDao.getAdminJoinLoginLog(id);
    }

    /**
     * 酷炫
     * @param admin_id
     * @return
     */
    public List<AdminLoginLog> getAdminLoginList(Integer admin_id) {
        return adminLoginLogDao.getListByAdminId(admin_id);
    }
}
